<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script>
			var i = 10;
			console.log(typeof i);
			i = i.toString();
			console.log(typeof i);
			
			console.log(typeof null);
//			返回object
			
			//字符串转数值
//			parseInt() 转为整型数值
//			parseFloat() 转为浮点类型数值
			i = parseInt(10,2);
			console.log(i);
			//颜色(16进制转成10进制)
			console.log(parseInt(0xFF,10));
			
			
			// 如果不能转换成数字的字符串返回NaN
			//number(null) 返回 0
			//number(undefined) 返回NaN
			
			
			var str1 = 'b';
			var str2 = 'a';
			if ( str1 > str2 ){
				console.log('str1大于str2');
			}else{
				console.log('str1str2');
			}
			
			//数组的判断
			var arr = [1,2];
			//判断数据类型的万金油
			var new_arr = Object.prototype.toString.call(arr);
			
			console.log(new_arr.slice(8,13));
			console.log(new_arr.toLowerCase());
			console.log(new_arr.toUpperCase());
		</script>
	</body>
</html>
